;:sys36864 ;.opt oo *= $c000 bsout =$ffd2 open =$ffc0 close =$ffc3 clrchn =$ffcc chkin =$ffc6 get =$ffe4 tmp =2 striout =$ab1e cr =13 cint =65409 vic =$d000 prganf =43 mem =247 talk =$ffb4 sectalk =$ff96 untalk =$ffab sa =$b9 fa =$ba iecin =$ffa5 f =8 key =198 return =$aad7 chrin =$ffcf setnam =$ffbd setpar =$ffba chkout =$ffc9 space =$ab3f axout =$bdcd fline =$cf80 sline =$cf00 namlen =$b7 facasc =$bddf intfloat =$bc49 fac =$62 buff =$100 setay =$bf0c ioflg =157 clall =$ffe7 jmp anfang lda #help jmp strout help .byte "\x93nss line-verify version 3.0\x1a" .byte "\x19'-\x1a" .byte "dieses programm vergleicht das im spei-" .byte " cher stehende basic-programm mit einem" .byte " auf disk stehenden zeilenweise. start" .byte " mit 'sys 49152'\x1a\x11v1.0: (c) nss 251286" .byte "\x1av2.0: (c) nss 070287" .byte "\x1av3.0: (c) nss 191287\x11\x03" titxt .byte "\x93\x9e\x8e\x08\xb0\x19&\xc0\xae\xdd\x12\x19\x08 nss line-verify v3.0\x19\x09 \x92\xdd" .byte "B\x12 von n. heusler\x19\x04 (c) nss 070287 \x92\xdd\xad\x19&\xc0\xbd\x1a\x03" wotxt .byte "bitte laden sie erst das erste programm" .byte "in den speicher !\x1a\x03" derr .byte "\x1a\x12achtung:\x92 \x03" drbs .byte "ausgabe auf \x12d\x92rucker oder \x12b\x92ildschirm ? \x12\x03" tname1 .byte "\x17im speicher ?\x1a\x03" tname2 .byte "\x17auf diskette ?\x1a\x03" weh .byte "\x1a\x1aname des programmes \x03" sicher .byte "\x11\x1a\x19\x04 \x12r\x92ichtig / \x12f\x92alsch / \x12e\x92nde ?\x1a\x03" i0 .byte "i0" prnt .byte "\x19\x0c p r i n t i n g\x1a\x03" adrt .byte "\x1a\x19\x06 (programm 1)\x19\x05 (programm 2)\x1a adr.:$\x03" hexz .byte "0123456789abcdef" both .byte "\x19\x06 beide programme beendet !\x1a\x03" mord .byte "vorzeit. ende\x1a\x03" richt .byte "\x19\x07 gleich\x1a\x03" fehlt .byte "fehlt\x1a\x03" unglt .byte "\x19\x04* unterschied \x19\x04*\x1a\x03" ask1 .byte "\x1a\x1astatistik ausgeben ? (j/n) \x12\x03" ask2 .byte "\x1a\x1aident. zeilen aufzaehlen ? (j/n) \x12\x03" stat1 .byte "\x11\x1aanzahl getestete zeilen \x19\x05. \x03" stat2 .byte "\x161 \x19\x04. \x03" stat3 .byte "\x162 \x19\x04. \x03" fau .byte "\x1aanzahl zeilen programm \x03" stat4 .byte "\x1agleiche zeilen \x19\x0e. \x03" stat5 .byte "\x1aunterschiedl. zeilen \x19\x08. \x03" stat6 .byte "\x1afehlende zeilen \x19\x0c.. \x03" serr .byte "\x1a\x1a\x1a\x12s y s t e m f e h l e r ! ! !\x1a\x1a\x1a\x03" outadr brk name1 .word 0,0,0,0,0,0,0,0 .byt 32 name2 .word 0,0,0,0,0,0,0,0 brk mode brk ends brk merkx brk linef .word 0 lines .word 0 anz1 .word 0 anz2 .word 0 feanz .word 0 zeanz .word 0 glanz .word 0 untanz .word 0 endf brk strout tax lda tmp pha lda tmp+1 pha stx tmp sty tmp+1 stt ldy #0 lda (tmp),y beq eoi cmp #"\x03" beq eoi cmp #"\x1a" bne nocr lda #cr nocr cmp #"\x19" beq repeat cmp #"\x17" beq www cmp #"\x16" beq vvv jsr bsout weiter inc tmp bne stt inc tmp+1 bne stt eoi pla sta tmp+1 pla sta tmp rts vvv lda #fau jsr strout jmp weiter repeat iny lda (tmp),y tax iny lda (tmp),y rpp jsr bsout dex bne rpp lda tmp clc adc #3 sta tmp lda tmp+1 adc #0 sta tmp+1 bne stt www lda #weh jsr strout jmp weiter title lda #titxt jmp strout vicinit jsr cint lda #6 sta vic+33 sta vic+32 rts cloall lda #64 sta ioflg lda #1 jsr close lda #2 jsr close jmp clall initf lda #2 ldx #i0 jsr setnam ldx #f lda #15 tay jsr setpar jsr open lda #15 jsr close status lda #f sta fa jsr talk lda #$6f sta sa jsr sectalk jsr iecin cmp #"0" beq aechtz pha lda #derr jsr strout pla jsr bsout errin jsr iecin jsr bsout cmp #cr bne errin sec .byt $24 aechtz clc php jsr untalk plp rts clrnam ldx #15 lda #32 cnam sta name1,x sta name2,x dex bpl cnam rt rts vorber lda #0 sta namlen jsr title lda outadr cmp #4 bne rt lda #prnt jmp strout hexout pha lsr lsr lsr lsr jsr hx pla hx and #$f tax lda hexz,x jmp bsout ougs jsr outs ldx #5 xspace jsr space dex bne xspace rts getfline jsr in jsr etfline jmp out etfline jsr get jsr get bne holl1 lda #-1 rts holl1 jsr get sta linef jsr get sta linef+1 ldx #0 inc anz2 bne holl inc anz2+1 holl stx merkx jsr get ldx merkx sta fline,x tay beq eol inx txa bpl holl jsr out lda #serr jsr strout lda #-1 rts eol lda #0 rts getsline jsr gets jsr gets bne soll1 lda #-1 rts soll1 jsr gets sta lines jsr gets sta lines+1 ldx #0 inc anz1 bne soll inc anz1+1 soll jsr gets sta sline,x beq eol inx bne soll gets ldy #0 lda (mem),y pha inc mem bne nocy inc mem+1 nocy pla rts in pha jsr clrchn ldx #2 jsr chkin pla rts out pha jsr clrchn ldx #1 jsr chkout pla rts full lda #"\xa6" ldx #5 fll sta buff,x dex bpl fll rts fuenfout sta fac stx fac+1 jsr full ldx #$90 sec jsr intfloat jsr facasc ldx #5 inc zeanz bne such0 inc zeanz+1 such0 lda buff,x beq fnd dex bpl such0 fnd cpx #5 bcs filled ldy #5 schieb lda buff,x sta buff,y dey dex bpl schieb lda #32 fill sta buff,y dey bpl fill filled jsr setay jsr striout lda #":" jmp bsout test lda lines+1 cmp linef+1 bcc sklein bne sgross lda lines cmp linef bcc sklein bne sgross lda #0 rts sgross lda #-1 rts sklein lda #1 rts fehl jsr xspace lda #fehlt jsr strout incfe inc feanz bne rtt inc feanz+1 rtt rts getmode lda #ask1 jsr strout sty key wk3 jsr get tax cmp #"n" beq nein cmp #"j" bne wk3 lda mode ora #2 sta mode nein txa jsr bsout lda #ask2 jsr strout sty key wk4 jsr get cmp #"n" beq ne cmp #"j" bne wk4 inc mode ne jmp bsout clrvar ldx #11 lda #0 sta mode cvar sta anz1,x dex bpl cvar rts anfang jsr cloall jsr vicinit jsr title jsr clrnam ldy #0 lda (prganf),y bne zweites wodenn lda #wotxt jmp strout zweites iny lda (prganf),y beq wodenn jsr initf bcc oky rts oky lda #drbs jsr strout sty key wk jsr get cmp #"b" beq bs cmp #"d" bne wk ldx #4 .byt $2c bs ldx #3 stx outadr jsr bsout lda #tname2 jsr strout jsr clrvar tax get1 jsr chrin cmp #cr beq cer1 sta name1,x inx cpx #16 bcc get1 cer1 lda #tname2 jsr strout ldx #0 get2 jsr chrin cmp #cr beq cer2 sta name2,x inx cpx #16 bcc get2 cer2 txa ldx #name2 jsr setnam jsr getmode lda #sicher jsr strout sty key wk2 jsr get cmp #"e" bne noend rts noend cmp #"f" bne nofalsch jmp anfang nofalsch cmp #"r" bne wk2 ldx #f lda #2 tay jsr setpar jsr open jsr status bcc goon rts goon jsr vorber ldx outadr lda #1 ldy #0 jsr setpar jsr open jsr out jsr return ldx #6 jsr xspace lda #name1 jsr strout lda #adrt jsr strout lda prganf+1 sta mem+1 jsr hexout lda prganf sta mem jsr hexout ldx #12 jsr xspace lda #"$" jsr bsout jsr in jsr get pha jsr get jsr out jsr hexout pla jsr hexout jsr return ldx #39 lda #"-" strich jsr bsout dex bne strich jsr return zeile jsr getsline sta ends jsr getfline sta endf cmp ends bne ungleich tax beq nofin inc endf inc ends lda #both jsr strout ende jsr statis jsr return jsr clrchn lda #2 jsr close lda #1 jmp close ungleich tax beq memend flopend ldx #23 .byt $2c memend ldx #6 jsr xspace lda #mord jsr strout jmp ende nofin jsr test beq gleich bpl schnells ldx linef lda linef+1 jsr fuenfout lda #fehlt jsr strout jsr incfe jsr getfline bne flopend beq nofin schnells jsr outs ldx #17 jsr fehl jsr getsline bne memend beq nofin gleich ldx #-1 comp inx lda sline,x cmp fline,x bne anders tay bne comp inc glanz bne nocarry inc glanz+1 nocarry lda mode and #1 beq qzeile jsr ougs lda #richt sag jsr strout jmp zeile anders inc untanz bne nocry inc untanz+1 nocry jsr ougs lda #unglt bne sag outs ldx lines lda 1+lines jmp fuenfout qzeile inc zeanz bne qq inc zeanz+1 qq jmp zeile statis lda mode and #2 beq hopp lda #stat1 jsr strout ldx zeanz lda zeanz+1 jsr axout lda #stat2 jsr strout ldx anz1 lda anz1+1 jsr axout lda endf beq j1 lda #"<" jsr bsout j1 lda #stat3 jsr strout ldx anz2 lda anz2+1 jsr axout lda ends beq j2 lda #"<" jsr bsout j2 lda #stat4 jsr strout ldx glanz lda glanz+1 jsr axout lda #stat5 jsr strout ldx untanz lda untanz+1 jsr axout lda #stat6 jsr strout ldx feanz lda feanz+1 jsr axout hopp lda #0 sta key rts